package request

type AlibabaServicecenterSpserviceorderUpdateRequest struct {
	/*
	   服务单id     */
	SpServiceOrderId *int64 `json:"sp_service_order_id" required:"true" `
	/*
	   新设备sn.当action填写addSn、changeSn时必填     */
	Action *string `json:"action,omitempty" required:"false" `
	/*
	   新设备sn.当action填写addSn、changeSn时必填     */
	NewSn *string `json:"new_sn,omitempty" required:"false" `
	/*
	   旧设备sn，当action填写changeSn时必填     */
	OldSn *string `json:"old_sn,omitempty" required:"false" `
	/*
	   服务有效期开始时间     */
	GmtEffect *string `json:"gmt_effect,omitempty" required:"false" `
	/*
	   服务过期时间     */
	GmtExpire *string `json:"gmt_expire,omitempty" required:"false" `
}

func (s *AlibabaServicecenterSpserviceorderUpdateRequest) SetSpServiceOrderId(v int64) *AlibabaServicecenterSpserviceorderUpdateRequest {
	s.SpServiceOrderId = &v
	return s
}
func (s *AlibabaServicecenterSpserviceorderUpdateRequest) SetAction(v string) *AlibabaServicecenterSpserviceorderUpdateRequest {
	s.Action = &v
	return s
}
func (s *AlibabaServicecenterSpserviceorderUpdateRequest) SetNewSn(v string) *AlibabaServicecenterSpserviceorderUpdateRequest {
	s.NewSn = &v
	return s
}
func (s *AlibabaServicecenterSpserviceorderUpdateRequest) SetOldSn(v string) *AlibabaServicecenterSpserviceorderUpdateRequest {
	s.OldSn = &v
	return s
}
func (s *AlibabaServicecenterSpserviceorderUpdateRequest) SetGmtEffect(v string) *AlibabaServicecenterSpserviceorderUpdateRequest {
	s.GmtEffect = &v
	return s
}
func (s *AlibabaServicecenterSpserviceorderUpdateRequest) SetGmtExpire(v string) *AlibabaServicecenterSpserviceorderUpdateRequest {
	s.GmtExpire = &v
	return s
}

func (req *AlibabaServicecenterSpserviceorderUpdateRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.SpServiceOrderId != nil {
		paramMap["sp_service_order_id"] = *req.SpServiceOrderId
	}
	if req.Action != nil {
		paramMap["action"] = *req.Action
	}
	if req.NewSn != nil {
		paramMap["new_sn"] = *req.NewSn
	}
	if req.OldSn != nil {
		paramMap["old_sn"] = *req.OldSn
	}
	if req.GmtEffect != nil {
		paramMap["gmt_effect"] = *req.GmtEffect
	}
	if req.GmtExpire != nil {
		paramMap["gmt_expire"] = *req.GmtExpire
	}
	return paramMap
}

func (req *AlibabaServicecenterSpserviceorderUpdateRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
